# $Id: PKGBUILD 148753 2012-02-05 11:49:14Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>

pkgbase=gnome-python
pkgname=('gnome-python' 'python2-bonobo' 'python2-gconf' 'python2-libgnome' 'python2-gnomecanvas' 'python2-gnomevfs')
pkgver=2.28.1
pkgrel=8
arch=(i686 x86_64)
license=('LGPL')
makedepends=('pygtk' 'pyorbit' 'libgnomeui')
options=('!libtool')
url="http://www.pygtk.org/"
source=(http://ftp.gnome.org/pub/gnome/sources/gnome-python/2.28/gnome-python-${pkgver}.tar.bz2)
sha256sums=('759ce9344cbf89cf7f8449d945822a0c9f317a494f56787782a901e4119b96d8')

build() {
    cd "${srcdir}/gnome-python-${pkgver}"
    PYTHON=python2 ./configure --prefix=/usr
    make
}

package_gnome-python() {
    pkgdesc="PyGNOME Python extension module"
    depends=('python2-bonobo' 'python2-gconf' 'python2-libgnome' 'python2-gnomecanvas' 'python2-gnomevfs')

    cd "${srcdir}/gnome-python-${pkgver}"
    make install-pkgconfigDATA DESTDIR="${pkgdir}"
}

package_python2-bonobo(){
    pkgdesc="Python bindings for interacting with Bonobo"
    depends=('pygtk' 'libbonoboui' 'pyorbit' 'python2-gnomecanvas')

    cd "${srcdir}/gnome-python-${pkgver}"
    make -C bonobo install DESTDIR="${pkgdir}"
}

package_python2-gconf(){
    pkgdesc="Python bindings for interacting with GConf"
    depends=('pygtk' 'gconf')

    cd "${srcdir}/gnome-python-${pkgver}"
    make -C gconf install DESTDIR="${pkgdir}"
}

package_python2-libgnome() {
    pkgdesc="Python bindings for libgnome"
    depends=('pygtk' 'libgnomeui' 'python2-gnomevfs' 'python2-gnomecanvas' 'python2-bonobo')

    cd "${srcdir}/gnome-python-${pkgver}"
    make -C gnome install DESTDIR="${pkgdir}"
}

package_python2-gnomecanvas() {
    pkgdesc="Python bindings for the GNOME Canvas"
    depends=('pygtk' 'libgnomecanvas')

    cd "${srcdir}/gnome-python-${pkgver}"
    make -C gnomecanvas install DESTDIR="${pkgdir}"
}

package_python2-gnomevfs() {
    pkgdesc="Python bindings for interacting with gnome-vfs"
    depends=('python2' 'libbonobo' 'gnome-vfs')

    cd "${srcdir}/gnome-python-${pkgver}"
    make -C gnomevfs install DESTDIR="${pkgdir}"
}
